import request from "./request";

let baseUrl = `${window.BaseUrl}fea-edit` 
export const getAxios = url => {
  return request({
    url,
    method: "get"
  });
};

//上传
export const uploadShp = data => {
  return request({
    url:`${baseUrl}/upload`,
    method: "post",
    data
  })
};

//更新要素要素
export const update = data => {
  return request({
    url:`${baseUrl}/update`,
    method: "post",
    data
  })
};

//清空所有要素
export const deleteAll = data => {
  return request({
    url:`${baseUrl}/deleteAll`,
    method: "post",
    data
  })
};

//任务状态查询
export const taskInfo = params => {
  return request({
    url:`${baseUrl}/taskInfo`,
    method: "get",
    params
  })
};


//数据导出shp
export const exportShp = tableName => {
  return request({
    url:`${baseUrl}/export/${tableName}`,
    method: "get"
  })
};


//数据下载
export const daownLoadData = tableName => {
  return request({
    url:`${baseUrl}/download/${tableName}`,
    method: "get"
  })
};
